﻿using System;

namespace enyo
{
    public class CustomListSelector : Control
    {
        /// <summary>
        /// The currently selected value.
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// An array of strings or objects specifying the item choices. 
        /// If objects are specified, they are component configurations and do not specify a kind. 
        /// Typically, a caption and value are specified.
        /// </summary>
        public object[] Items { get; set; }

        /// <summary>
        /// A label descibing the set of available choices. It is shown to the left of the drop-down arrow.
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// Hides the displayed item.
        /// </summary>
        public bool HideItem { get; set; }

        /// <summary>
        /// Hides the drop-down arrow.
        /// </summary>
        public bool HideArrow { get; set; }

        /// <summary>
        /// Determines with which side of the list selector to align the popup; defaults to right, can also be left.
        /// </summary>
        public PopupAlign PopupAlign { get; set; }

        /// <summary>
        /// Determines if the content of the list selector is packed to start (default), middle, or end.
        /// </summary>        
        public ContentPack ContentPack { get; set; }

        /// <summary>
        /// Event fired when the selected value changes. The event sends both the current and previous values.
        /// </summary>
        //TODO:/*inSender, inValue, inOldValue*/
        public EnyoEvent<Control, object, object> onChange;

        /// <summary>
        /// Event fired whenever an item is selected, even if it is the same item that was previously selected.
        /// </summary>
        //TODO:/*xxx, inselected, item*/
        public EnyoEvent<Control, object, object> onSelect;
    }
}
